package com.lingyu.jsjx.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 科研管理对象 jsjx_scientific_research
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Data
@TableName("jsjx_scientific_research")
public class ScientificResearch extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 科研项目唯一标识ID */
    @TableId(type = IdType.AUTO,value = "research_id")
    private Long researchId;

    /** 科研标题 */
    @Excel(name = "科研标题")
    @NotBlank(message = "科研标题不能为空")
    private String researchTitle;

    /** 科研级别id */
    @Excel(name = "科研级别", readConverterExp = "87=国家级,88=省部级,89=市级,90=校级")
    @NotNull(message = "科研级别不能为空")
    private Long researchLevelId;

    /** 科研级别name */
    private String researchLevelName;

    /** 科研类型 */
    @Excel(name = "科研类型", readConverterExp = "83=项目研发,84=论文发表,85=技能大赛,86=课题研究")
    @NotBlank(message = "科研类型不能为空")
    private String researchTypeId;

    /** 科研类型 */
    private String researchTypeName;

    /** 所属学院id */
    @NotNull(message = "所属学院不能为空")
    private Long collageId;

    /** 所属学院name */
    @Excel(name = "所属学院")
    private String collageName;

    /** 负责人 */
    @Excel(name = "负责人")
    @NotBlank(message = "负责人不能为空")
    private String principal;

    /** 经费总额（单位：元） */
    @Excel(name = "经费总额（元）")
    @NotNull(message = "经费总额不能为空")
    private BigDecimal budget;

    /** 承担单位 */
    @Excel(name = "承担单位")
    private String organization;

    /** 学术获奖情况 */
    @Excel(name = "学术获奖情况")
    private String academicAwards;

    /** 关联课程 */
    @Excel(name = "关联课程")
    private String relatedCourse;

    /** 教学应用 */
    @Excel(name = "教学应用", readConverterExp = "146=案例教学,147=实验设计,148=教案素材,149=课程思政融合")
    @NotNull(message = "教学应用不能为空")
    private Long teachingApplicationId;

    private String teachingApplicationName;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空")
    private Date startDate;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "结束时间不能为空")
    private Date endDate;

    /** 科研成果文件路径 */
    private String resultFileId;

    //状态
    private Long statusId;

    private String statusName;

    @TableField(exist = false)
    private List<FileInfo> resultFileList;
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("researchId", getResearchId())
            .append("researchTitle", getResearchTitle())
            .append("researchLevelId", getResearchLevelId())
            .append("researchLevelName", getResearchLevelName())
            .append("researchTypeId", getResearchTypeId())
            .append("researchTypeName", getResearchTypeName())
            .append("collageId", getCollageId())
            .append("collageName", getCollageName())
            .append("principal", getPrincipal())
            .append("budget", getBudget())
            .append("organization", getOrganization())
            .append("academicAwards", getAcademicAwards())
            .append("relatedCourse", getRelatedCourse())
            .append("teachingApplicationId", getTeachingApplicationId())
            .append("teachingApplicationName", getTeachingApplicationName())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("resultFileId", getResultFileId())
            .append("statusId", getStatusId())
            .append("statusName", getStatusName())
            .append("createBy", getCreateBy())
            .append("createByName", getCreateByName())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateByName", getUpdateByName())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
